package cn.tedu.seckill.mapper;

import com.jt.common.pojo.Seckill;
import com.jt.common.pojo.Success;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface SeckillMapper {
    List<Seckill> selectSeckills();

    Seckill selectSeckillById(Long seckillId);

    int decrNumber(@Param("seckillId")Long seckillId,
                   @Param("nowTime")Date nowTime);

    void insertSuccess(Success suc);

    List<Success> selectSuccess(Long seckillId);
}
